<table border="1" width="80%" align="center" cellpadding="10">
<?php
  for ($i = 1; $i <= 10 ; $i++)
  {
    $color = $i%2==0 ? 'red':'green';
?>
  <tr>
<?php
  for ($j = 1; $j <= 3; $j++)
  {
?>
    <td style="background:<?=$color?>">Table Data <?=$i?></td>
<?php
  }// end inner for
?>
  </tr>
<?php
  }// end for()
?>
</table>


